from app import serializer
from marshmallow import (
    fields,
    Schema,
    validates,
    validates_schema,
    ValidationError,
    post_dump,
    post_load,
)


class UpdateFiles(Schema):
    # 列表中的文件字段用fields.Function
    file = fields.List(fields.Function)
    name = fields.String()

    @validates_schema
    def validate(self, data, **kwargs):
        print(data)
